﻿<%@ Page Language="C#" MasterPageFile="~/Template/ADMIN_QUANLY.Master" AutoEventWireup="true" CodeBehind="quanlysanpham.aspx.cs" Inherits="BTN04.ADMIN.quanlysanpham" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 
    <style type="text/css">
        .style1
        {
            width: 753px;
        }
        .style3
        {
            width: 348px;
            height: 28px;
        }
        .style6
        {
            width: 224px;
        }
        .style7
        {
            width: 348px;
        }
        .style8
        {
            height: 7px;
        }
        .style9
        {
            width: 348px;
            height: 7px;
        }
        .style10
        {
            height: 6px;
        }
        .style11
        {
            width: 348px;
            height: 6px;
        }
    </style>

 
</asp:Content>
<asp:Content ID="Content2" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    <table class="style1" align="center" >
        <tr>
            <td style="text-align:center;font-weight:bold;font-size:larger; color:Aqua">
                QUẢN LÝ SẢN PHẨM
                <br />
            </td>
        </tr>
        <tr>
            <td>
             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1" 
        PageSize="5" ShowFooter="True" AllowPaging="True" HorizontalAlign="Center" 
                    Width="686px" onselectedindexchanged="GridView1_SelectedIndexChanged" style="margin-left: 0px" 
                   >
                 <PagerSettings FirstPageText="Trang đầu" Mode="NumericFirstLast" 
                     PreviousPageText="Trang cuối" />
                 <FooterStyle HorizontalAlign="Center" />
                 <RowStyle ForeColor="#FF6699" HorizontalAlign="Center" />
        <Columns>
            <asp:BoundField DataField="MaSanPham" HeaderText="Mã SP" 
                SortExpression="MaSanPham" />
            <asp:BoundField DataField="TenSanPham" HeaderText="Tên Sản Phẩm" 
                SortExpression="TenSanPham" />
            <asp:BoundField DataField="TenXuatSu" HeaderText="Tên Xuất Sứ" 
                SortExpression="TenXuatSu" />
            <asp:BoundField DataField="TenLoaiSanPham" HeaderText="Loại Sản Phẩm" 
                SortExpression="TenLoaiSanPham" />
            <asp:BoundField DataField="TenNhaSanXuat" HeaderText="Nhà Sản Xuất" 
                SortExpression="TenNhaSanXuat" />
            <asp:CommandField SelectText="Chọn" ShowSelectButton="True">
                <ItemStyle ForeColor="#66FF33" HorizontalAlign="Center" />
            </asp:CommandField>
        </Columns>
                 <PagerStyle ForeColor="#66CCFF" HorizontalAlign="Center" />
                 <EmptyDataTemplate>
                     Mã SP
                 </EmptyDataTemplate>
                 <HeaderStyle ForeColor="Yellow" />
    </asp:GridView>
            </td>
            <tr>
                    <td style="color: #FF0000">
                        
                        <table  border="1"  >
                            <tr>
                                <td class="style10" >
                                    Mã Sản Phẩm
                                </td>
                                <td class="style11" >
                                    <asp:TextBox ID="txtMaSP" runat="server" Width="128px" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td  rowspan="9" class="style6">
                                    <asp:Image ID="HinhSP" runat="server" Height="183px" 
                                        ImageUrl="~/Images/Upload/0000001.jpg" Width="223px" BackColor="#FF3399" 
                                        BorderColor="#FF33CC" ImageAlign="Middle" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style8">
                                    Tên Sản Phẩm</td>
                                <td class="style9">
                                    <asp:TextBox ID="txtTenSP" runat="server" Width="242px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Loại Sản Phẩm</td>
                                <td class="style7">
                                    <asp:DropDownList ID="drLoaiSP" runat="server" Width="172px" 
                                        AutoPostBack="True" Height="37px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Tình Trạng Sản Phẩm</td>
                                <td class="style7">
                                    <asp:DropDownList ID="drTinhTrangSP" runat="server" Width="161px" 
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Nhà Sản Xuất</td>
                                <td class="style7">
                                    <asp:DropDownList ID="drNhaSX" runat="server" Width="158px" AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Gía Bán</td>
                                <td class="style7">
                                    <asp:TextBox ID="txtGiaBan" runat="server" Width="143px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td>
                                    Số lượng tồn</td>
                                <td class="style7">
                                    <asp:TextBox ID="txtSoLuongTon" runat="server" style="width: 128px" 
                                        Width="170px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td>
                                    Số lượng xem</td>
                                <td class="style7">
                                    <asp:TextBox ID="txtSoLuongXem" runat="server" Width="186px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td>
                                    Xuất sứ</td>
                                <td class="style3">
                                    <asp:DropDownList ID="drXuatXu" runat="server" Width="130px" 
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Hình Anh</td>
                                <td id="txtHinhAnh" class="style7">
                                    <asp:TextBox ID="txtHinhAnh" runat="server" Width="242px"></asp:TextBox>
                                </td>
                                <td class="style6">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    UpLoad Hinh Khác</td>
                                <td id="txtHinhAnh" class="style7">
                                    <asp:FileUpload ID="UpLoaiHinh" runat="server" Height="25px" Width="214px" /> &nbsp;&nbsp;<asp:Button ID="btnUpLoad" runat="server" onclick="btnUpLoad_Click" 
                                        Text="UpLoad" Width="92px" />
                                </td>
                                <td class="style6">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    Khuyến mãi</td>
                                <td id="MaSP" class="style7">
                                    <asp:DropDownList ID="drKhuyenMai" runat="server" Width="186px" 
                                        AutoPostBack="True">
                                    </asp:DropDownList>
                                </td>
                                <td class="style6">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td>
                                    Mô tả</td>
                                <td class="style7">
                                    <asp:TextBox ID="txtMoTa" runat="server" Width="261px"></asp:TextBox>
                                </td>
                                <td class="style6">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td></td>
                                <td id="Hi" class="style7"> 
                                    <asp:Button runat="server" ID="btnThem" Text="Thêm" Width="48px" 
                                        onclick="btnThem_Click" /> &nbsp;&nbsp;<asp:Button  runat="server" 
                                        ID="btnXoa" Text="Xóa" Width="46px" 
                                        onclick="btnXoa_Click" />&nbsp;&nbsp;<asp:Button  runat="server" 
                                        ID="btnSua" Text="Sửa" Width="48px" 
                                        onclick="btnSua_Click" />&nbsp;&nbsp;
                                        <asp:Button  runat="server" 
                                        ID="btnThemMoi" Text="Thêm Mới" Width="74px" 
                                        onclick="btnThemMoi_Click" />
                                    </td>
                                <td class="style6"></td>
                            </tr>
                             <tr>
                                <td>
                                   &nbsp;
                                </td>
                                <td class="style7">
                                    <asp:Label ID="ThongBao" runat="server" ForeColor="#FF3300"></asp:Label>
                                </td>
                                <td  rowspan="9" class="style6">
                                </td>
                            </tr>
                        </table>
                        
                    </td>
            </tr>
      
     
       
             
    </table>

  
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="HienThiChiTietToanBoSanPham" TypeName="BTN04.BUS.SanPhamBUS" 
        UpdateMethod="XoaMotSanPhamDuaVaoMa">
        <UpdateParameters>
            <asp:Parameter Name="ma" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>

                       
</asp:Content>

